//
//  STNextViewController.m
//  Created by 崔博 on 16/12/1.
//  Copyright © 2016年 崔博. All rights reserved.


#import "STNextViewController.h"
#import "STRegisHanlde.h"
@interface STNextViewController ()
@property (weak, nonatomic) IBOutlet UILabel *phoneLabel;
@property (weak, nonatomic) IBOutlet UIButton *limitBtn;
@property (nonatomic, assign) NSInteger time;
@end

@implementation STNextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = BACKGROUND_COLOR;
    self.phoneLabel.text = self.loginModel.userName;
}

#pragma mark - event
// sendmessage
- (IBAction)sendMessage:(id)sender {
    [STRegisHanlde executeGetYanZhengMaNumber:self.loginModel.userName WitchSucess:^(id obj) {
        [self.view makeToast:obj duration:0.5 position:CSToastPositionCenter];
    } failed:^(id obj) {
        
    }];
}

// 注册
- (IBAction)regis:(id)sender {
    NSDictionary *dic = @{@"LoginName":self.loginModel.userName,
                          @"Lpassword":self.loginModel.pwd,
                          @"Code":self.loginModel.code,
                          @"Telephone":self.loginModel.userName};
    [STRegisHanlde executeRegisUserYazhengma:dic WitchSucess:^(id obj) {
        [self.view makeToast:obj duration:0.5 position:CSToastPositionCenter];
    } failed:^(id obj) {
        [self.view makeToast:obj duration:0.5 position:CSToastPositionCenter];
    }];
}
// 文本框
- (IBAction)yanzhengma:(id)sender {
    UITextField *t = (UITextField *)sender;
    self.loginModel.code = t.text;
}


@end
